/*
 * Copyright 2020 www.mytijian.com All right reserved. This software is the
 * confidential and proprietary information of www.mytijian.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with www.mytijian.com.
 */
package com.mytijian.task.task.step;

import com.mytijian.task.enums.TaskTypeEnum;
import com.mytijian.task.task.process.TaskProcess;

public class TaskStep {
    private TaskTypeEnum taskTypeEnum;
    private DataReader dataReader;
    private Integer retryTimes;
    private Exception e;
    private TaskProcess taskProcess;
    private TaskValidator taskValidator;
    public TaskStep processRetry(Integer retryTimes, Exception e) {
        return this;
    }
    public<O,I> TaskStep reader(DataReader<O,I> dataReader) {
        return null;
    }
    public <I> TaskStep process(TaskProcess<I> taskProcess) {
        return null;
    }
    public TaskStep taskType(TaskTypeEnum taskTypeEnum) {
        return null;
    }
    public <T> TaskStep beforeSubmitValidate(TaskValidator<T> taskValidator) {
        return null;
    }
    public void complete() {
        TaskStepContainer.put(taskTypeEnum, this);
    }


    protected TaskTypeEnum getTaskTypeEnum() {
        return taskTypeEnum;
    }

    protected <O,I> DataReader<O,I> getDataReader() {
        return dataReader;
    }

    protected Integer getRetryTimes() {
        return retryTimes;
    }

    protected Exception getE() {
        return e;
    }

    protected TaskProcess getTaskProcess() {
        return taskProcess;
    }

    protected TaskValidator getTaskValidator() {
        return taskValidator;
    }
}
